package com.zzh.partnersys.controller;


import com.zzh.partnersys.common.exception.BusinessException;
import com.zzh.partnersys.common.exception.ResultCodeEnum;
import com.zzh.partnersys.common.exception.ResultUtils;
import com.zzh.partnersys.entity.vo.UserApplyVO;
import com.zzh.partnersys.service.UserApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import jakarta.servlet.http.HttpServletRequest;

/**
 * <p>
 * 用户申请�?前端控制�?
 * </p>
 *
 * @author zzh
 * @since 2024-08-11
 */
@RestController
@RequestMapping("/user-apply")
public class UserApplyController {

    @Autowired
    private UserApplyService userApplyService;

    @GetMapping("/selectApplyInfo")
    public ResultUtils selectApplyInfo(HttpServletRequest request){
        if (request == null){
            throw new BusinessException(ResultCodeEnum.PARAMS_ERROR);
        }
        UserApplyVO userApplyVO = userApplyService.selectApplyInfo(request);
        return ResultUtils.ok(userApplyVO);
    }

}

